home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / clib / exec_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-28  |  8.5 KB  |  192 lines

  1. #ifndef  CLIB_EXEC_PROTOS_H
  2. #define  CLIB_EXEC_PROTOS_H
  3.  
  4. /*
  5. **    $VER: exec_protos.h 40.2 (6.6.1998)
  6. **
  7. **    C prototypes. For use with 32 bit integers only.
  8. **
  9. **    Copyright © 1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif /* __cplusplus */
  16.  
  17. #ifndef  EXEC_TYPES_H
  18. #include <exec/types.h>
  19. #endif
  20. #ifndef  EXEC_TASKS_H
  21. #include <exec/tasks.h>
  22. #endif
  23. #ifndef  EXEC_MEMORY_H
  24. #include <exec/memory.h>
  25. #endif
  26. #ifndef  EXEC_PORTS_H
  27. #include <exec/ports.h>
  28. #endif
  29. #ifndef  EXEC_DEVICES_H
  30. #include <exec/devices.h>
  31. #endif
  32. #ifndef  EXEC_IO_H
  33. #include <exec/io.h>
  34. #endif
  35. #ifndef  EXEC_SEMAPHORES_H
  36. #include <exec/semaphores.h>
  37. #endif
  38. /*------ misc ---------------------------------------------------------*/
  39. ULONG Supervisor( ULONG (*CONST userFunction)() );
  40. /*------ special patchable hooks to internal exec activity ------------*/
  41. /*------ module creation ----------------------------------------------*/
  42. VOID InitCode( ULONG startClass, ULONG version );
  43. VOID InitStruct( CONST APTR initTable, APTR memory, ULONG size );
  44. struct Library *MakeLibrary( CONST APTR funcInit, CONST APTR structInit, ULONG (*CONST libInit)(), ULONG dataSize, ULONG segList );
  45. VOID MakeFunctions( APTR target, CONST APTR functionArray, ULONG funcDispBase );
  46. struct Resident *FindResident( CONST_STRPTR name );
  47. APTR InitResident( CONST struct Resident *resident, ULONG segList );
  48. /*------ diagnostics --------------------------------------------------*/
  49. VOID Alert( ULONG alertNum );
  50. VOID Debug( ULONG flags );
  51. /*------ interrupts ---------------------------------------------------*/
  52. VOID Disable( VOID );
  53. VOID Enable( VOID );
  54. VOID Forbid( VOID );
  55. VOID Permit( VOID );
  56. ULONG SetSR( ULONG newSR, ULONG mask );
  57. APTR SuperState( VOID );
  58. VOID UserState( APTR sysStack );
  59. struct Interrupt *SetIntVector( LONG intNumber, CONST struct Interrupt *interrupt );
  60. VOID AddIntServer( LONG intNumber, struct Interrupt *interrupt );
  61. VOID RemIntServer( LONG intNumber, struct Interrupt *interrupt );
  62. VOID Cause( struct Interrupt *interrupt );
  63. /*------ memory allocation --------------------------------------------*/
  64. APTR Allocate( struct MemHeader *freeList, ULONG byteSize );
  65. VOID Deallocate( struct MemHeader *freeList, APTR memoryBlock, ULONG byteSize );
  66. APTR AllocMem( ULONG byteSize, ULONG requirements );
  67. APTR AllocAbs( ULONG byteSize, APTR location );
  68. VOID FreeMem( APTR memoryBlock, ULONG byteSize );
  69. ULONG AvailMem( ULONG requirements );
  70. struct MemList *AllocEntry( struct MemList *entry );
  71. VOID FreeEntry( struct MemList *entry );
  72. /*------ lists --------------------------------------------------------*/
  73. VOID Insert( struct List *list, struct Node *node, struct Node *pred );
  74. VOID AddHead( struct List *list, struct Node *node );
  75. VOID AddTail( struct List *list, struct Node *node );
  76. VOID Remove( struct Node *node );
  77. struct Node *RemHead( struct List *list );
  78. struct Node *RemTail( struct List *list );
  79. VOID Enqueue( struct List *list, struct Node *node );
  80. struct Node *FindName( struct List *list, CONST_STRPTR name );
  81. /*------ tasks --------------------------------------------------------*/
  82. APTR AddTask( struct Task *task, CONST APTR initPC, CONST APTR finalPC );
  83. VOID RemTask( struct Task *task );
  84. struct Task *FindTask( CONST_STRPTR name );
  85. BYTE SetTaskPri( struct Task *task, LONG priority );
  86. ULONG SetSignal( ULONG newSignals, ULONG signalSet );
  87. ULONG SetExcept( ULONG newSignals, ULONG signalSet );
  88. ULONG Wait( ULONG signalSet );
  89. VOID Signal( struct Task *task, ULONG signalSet );
  90. BYTE AllocSignal( LONG signalNum );
  91. VOID FreeSignal( LONG signalNum );
  92. LONG AllocTrap( LONG trapNum );
  93. VOID FreeTrap( LONG trapNum );
  94. /*------ messages -----------------------------------------------------*/
  95. VOID AddPort( struct MsgPort *port );
  96. VOID RemPort( struct MsgPort *port );
  97. VOID PutMsg( struct MsgPort *port, struct Message *message );
  98. struct Message *GetMsg( struct MsgPort *port );
  99. VOID ReplyMsg( struct Message *message );
  100. struct Message *WaitPort( struct MsgPort *port );
  101. struct MsgPort *FindPort( CONST_STRPTR name );
  102. /*------ libraries ----------------------------------------------------*/
  103. VOID AddLibrary( struct Library *library );
  104. VOID RemLibrary( struct Library *library );
  105. struct Library *OldOpenLibrary( CONST_STRPTR libName );
  106. VOID CloseLibrary( struct Library *library );
  107. APTR SetFunction( struct Library *library, LONG funcOffset, ULONG (*CONST newFunction)() );
  108. VOID SumLibrary( struct Library *library );
  109. /*------ devices ------------------------------------------------------*/
  110. VOID AddDevice( struct Device *device );
  111. VOID RemDevice( struct Device *device );
  112. BYTE OpenDevice( CONST_STRPTR devName, ULONG unit, struct IORequest *ioRequest, ULONG flags );
  113. VOID CloseDevice( struct IORequest *ioRequest );
  114. BYTE DoIO( struct IORequest *ioRequest );
  115. VOID SendIO( struct IORequest *ioRequest );
  116. struct IORequest *CheckIO( struct IORequest *ioRequest );
  117. BYTE WaitIO( struct IORequest *ioRequest );
  118. VOID AbortIO( struct IORequest *ioRequest );
  119. /*------ resources ----------------------------------------------------*/
  120. VOID AddResource( APTR resource );
  121. VOID RemResource( APTR resource );
  122. APTR OpenResource( CONST_STRPTR resName );
  123. /*------ private diagnostic support -----------------------------------*/
  124. /*------ misc ---------------------------------------------------------*/
  125. APTR RawDoFmt( CONST_STRPTR formatString, CONST APTR dataStream, VOID (*CONST putChProc)(), APTR putChData );
  126. ULONG GetCC( VOID );
  127. ULONG TypeOfMem( CONST APTR address );
  128. ULONG Procure( struct SignalSemaphore *sigSem, struct SemaphoreMessage *bidMsg );
  129. VOID Vacate( struct SignalSemaphore *sigSem, struct SemaphoreMessage *bidMsg );
  130. struct Library *OpenLibrary( CONST_STRPTR libName, ULONG version );
  131. /*--- functions in V33 or higher (Release 1.2) ---*/
  132. /*------ signal semaphores (note funny registers)----------------------*/
  133. VOID InitSemaphore( struct SignalSemaphore *sigSem );
  134. VOID ObtainSemaphore( struct SignalSemaphore *sigSem );
  135. VOID ReleaseSemaphore( struct SignalSemaphore *sigSem );
  136. ULONG AttemptSemaphore( struct SignalSemaphore *sigSem );
  137. VOID ObtainSemaphoreList( struct List *sigSem );
  138. VOID ReleaseSemaphoreList( struct List *sigSem );
  139. struct SignalSemaphore *FindSemaphore( STRPTR name );
  140. VOID AddSemaphore( struct SignalSemaphore *sigSem );
  141. VOID RemSemaphore( struct SignalSemaphore *sigSem );
  142. /*------ kickmem support ----------------------------------------------*/
  143. ULONG SumKickData( VOID );
  144. /*------ more memory support ------------------------------------------*/
  145. VOID AddMemList( ULONG size, ULONG attributes, LONG pri, APTR base, CONST_STRPTR name );
  146. VOID CopyMem( CONST APTR source, APTR dest, ULONG size );
  147. VOID CopyMemQuick( CONST APTR source, APTR dest, ULONG size );
  148. /*------ cache --------------------------------------------------------*/
  149. /*--- functions in V36 or higher (Release 2.0) ---*/
  150. VOID CacheClearU( VOID );
  151. VOID CacheClearE( APTR address, ULONG length, ULONG caches );
  152. ULONG CacheControl( ULONG cacheBits, ULONG cacheMask );
  153. /*------ misc ---------------------------------------------------------*/
  154. APTR CreateIORequest( CONST struct MsgPort *port, ULONG size );
  155. VOID DeleteIORequest( APTR iorequest );
  156. struct MsgPort *CreateMsgPort( VOID );
  157. VOID DeleteMsgPort( struct MsgPort *port );
  158. VOID ObtainSemaphoreShared( struct SignalSemaphore *sigSem );
  159. /*------ even more memory support -------------------------------------*/
  160. APTR AllocVec( ULONG byteSize, ULONG requirements );
  161. VOID FreeVec( APTR memoryBlock );
  162. /*------ V39 Pool LVOs...*/
  163. APTR CreatePool( ULONG requirements, ULONG puddleSize, ULONG threshSize );
  164. VOID DeletePool( APTR poolHeader );
  165. APTR AllocPooled( APTR poolHeader, ULONG memSize );
  166. VOID FreePooled( APTR poolHeader, APTR memory, ULONG memSize );
  167. /*------ misc ---------------------------------------------------------*/
  168. ULONG AttemptSemaphoreShared( struct SignalSemaphore *sigSem );
  169. VOID ColdReboot( VOID );
  170. VOID StackSwap( struct StackSwapStruct *newStack );
  171. /*------ task trees ---------------------------------------------------*/
  172. VOID ChildFree( APTR tid );
  173. VOID ChildOrphan( APTR tid );
  174. VOID ChildStatus( APTR tid );
  175. VOID ChildWait( APTR tid );
  176. /*------ future expansion ---------------------------------------------*/
  177. APTR CachePreDMA( CONST APTR address, ULONG *length, ULONG flags );
  178. VOID CachePostDMA( CONST APTR address, ULONG *length, ULONG flags );
  179. /*------ New, for V39*/
  180. /*--- functions in V39 or higher (Release 3) ---*/
  181. /*------ Low memory handler functions*/
  182. VOID AddMemHandler( struct Interrupt *memhand );
  183. VOID RemMemHandler( struct Interrupt *memhand );
  184. /*------ Function to attempt to obtain a Quick Interrupt Vector...*/
  185. ULONG ObtainQuickVector( APTR interruptCode );
  186.  
  187. #ifdef __cplusplus
  188. }
  189. #endif /* __cplusplus */
  190.  
  191. #endif   /* CLIB_EXEC_PROTOS_H */
  192.